﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.Common;
using DataAccess;

/// <summary>
/// Summary description for UpdateManager
/// </summary>
public class UpdateManager
{
	public UpdateManager()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public bool Update(Manager manager)
    {
        bool result = false;
        DbCommand cmd = GenericData.CreateCommand();
        cmd.CommandText = "Update Manager SET Fullname = '" + manager.Fullname + "', Email = '" + manager.Email + "', Mobile = '" + manager.Mobile + "', Address = '" + manager.Address + "' WHERE ID = " + manager.ID;
        if (GenericData.ExecuteNoneQuery(cmd) > 0)
            result = true;
        return result;
    }
}